<?php

/**
 * UsuarioHasServicio form base class.
 *
 * @method UsuarioHasServicio getObject() Returns the current form's model object
 *
 * @package    cronos-doctrine
 * @subpackage form
 * @author     Your name here
 * @version    SVN: $Id: sfDoctrineFormGeneratedTemplate.php 29553 2010-05-20 14:33:00Z Kris.Wallsmith $
 */
abstract class BaseUsuarioHasServicioForm extends BaseFormDoctrine
{
  public function setup()
  {
    $this->setWidgets(array(
      'usuario_id'        => new sfWidgetFormInputHidden(),
      'categoria_id'      => new sfWidgetFormInputHidden(),
      'llamada_status_id' => new sfWidgetFormInputHidden(),
      'depuracion'        => new sfWidgetFormInputHidden(),
      'ordenado'          => new sfWidgetFormInputHidden(),
      'empresa_id'        => new sfWidgetFormInputText(),
    ));

    $this->setValidators(array(
      'usuario_id'        => new sfValidatorChoice(array('choices' => array($this->getObject()->get('usuario_id')), 'empty_value' => $this->getObject()->get('usuario_id'), 'required' => false)),
      'categoria_id'      => new sfValidatorChoice(array('choices' => array($this->getObject()->get('categoria_id')), 'empty_value' => $this->getObject()->get('categoria_id'), 'required' => false)),
      'llamada_status_id' => new sfValidatorChoice(array('choices' => array($this->getObject()->get('llamada_status_id')), 'empty_value' => $this->getObject()->get('llamada_status_id'), 'required' => false)),
      'depuracion'        => new sfValidatorChoice(array('choices' => array($this->getObject()->get('depuracion')), 'empty_value' => $this->getObject()->get('depuracion'), 'required' => false)),
      'ordenado'          => new sfValidatorChoice(array('choices' => array($this->getObject()->get('ordenado')), 'empty_value' => $this->getObject()->get('ordenado'), 'required' => false)),
      'empresa_id'        => new sfValidatorInteger(array('required' => false)),
    ));

    $this->widgetSchema->setNameFormat('usuario_has_servicio[%s]');

    $this->errorSchema = new sfValidatorErrorSchema($this->validatorSchema);

    $this->setupInheritance();

    parent::setup();
  }

  public function getModelName()
  {
    return 'UsuarioHasServicio';
  }

}
